package com.zjgsu.nftplatform.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @author ahy231
 * @date 2022/3/6 11:56
 * @description
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("评论信息")
public class CommentInfo {
    @ApiModelProperty("评论id")
    private Long id;
    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("头像")
    private String portrait;
    @ApiModelProperty("用户id")
    private Long userId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("日期")
    private Date time;
    @ApiModelProperty("点赞数")
    private Integer stars;
    @ApiModelProperty("评论内容")
    private String content;
    @ApiModelProperty("父评论id")
    private Long replyId;
    @ApiModelProperty("评论回复")
    private List<CommentInfo> children;
}
